package org.summerframework.component.security.oauth.wechat;

import org.summerframework.component.security.oauth.LoginType;
import org.summerframework.component.security.oauth.OAuthAppIdAndAppSecret;

public class WechatOAuthSupper extends AbstractWechatOAuthSupper implements WechatOAuthInterceptor {
    private final WechatAppIdAndAppSecret wechatAppIdAndAppSecret;

    public WechatOAuthSupper(WechatAppIdAndAppSecret wechatAppIdAndAppSecret) {
        this.wechatAppIdAndAppSecret = wechatAppIdAndAppSecret;
    }

    @Override
    public OAuthAppIdAndAppSecret getOAuthInfo() {
        return wechatAppIdAndAppSecret;
    }

    @Override
    public boolean supportsType(LoginType loginType) {
        return LoginType.WECHAT == loginType;
    }
}
